import yaml

# yaml.warnings({'YAMLLoadWarning': False})
with open("atest_yaml.yaml", "r") as f:
    data1 = yaml.full_load(f)
    print(data1, type(data1))


data = {'Search_Data': {
    'search_test_002': {'expect': {'value': '你好'}, 'value': '你好'},
    'search_test_001': {'expect': [4, 5, 6], 'value': 456}
}
}
with open("hello.yaml", "w", encoding="utf-8") as f:
    yaml.dump(data, f, allow_unicode=True)
